import { defineComponent, onBeforeMount, reactive, toRaw } from 'vue';
import virtualList from './views/virtualList/virtualList';

export default defineComponent({
	name: 'App',
	components: { virtualList },
	setup() {
		const list = reactive<{ arr: number[] }>({
			arr: [],
		});
		onBeforeMount(() => {
			list.arr = new Array(1000)
				.toString()
				.split(',')
				.map(function (item, index) {
					return index;
				});
		});
		return () => <virtualList list={list.arr}></virtualList>;
	},
});
